<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* var love = prompt('你爱我吗？');
        while (love !== '我爱你') {
            var love = prompt('你爱我吗？');
        }
        alert('我也爱你啊！'); */
        //1到100的和
        /* var i = 1;
        sum = 0;
        while (i <= 100) {
            sum += i;
            i++;
        }
        alert(sum); */
        //打印一生，从1到100岁
        var i = 1;
        while (i <= 100) {
            console.log('你今年已经' + i + '岁了');
            i++;
        }
    </script>
</head>

<body>

</body>

</html>